<template>
  <el-checkbox v-bind="$attrs" :value="yn_value" @input="inputEvent">
    <slot></slot>

  </el-checkbox>
</template>

<script>
export default {
  name: 'checkbox-yn',
  props: {
    value: String,
  },
  computed: {
    yn_value() {
      return this.value == 'Y'
    },
  },
  methods: {
    inputEvent(e) {
      this.$emit("input", e ? 'Y' : 'N')
    },
  }
}
</script>
